/*
 * InterfaceExtTable.java
 *
 * $Id: InterfaceExtTable.java,v 1.1 2008-03-18 12:58:45 mario Exp $
 *
 * Author: Mario García García - Imagos 2007
 */
package org.ceteca.explica.core.extTables;

/**
 * Public interface with the constant definitions regarding
 * Extended Tables. It holds the constant values for extended tables
 * database field names and the database table and view names necessary 
 * to the Extended Tables module.  
 */

public interface InterfaceExtTable {
	// Database table and view names of the tables involved in the Extension Tables module.
	// These tables and views will be used in the querys and update statements that take
	// part in the Extension Tables module operations implemented. 
	public static final String EXT_TABLE_NAME = "ExtTableDefinition";
	public static final String EXT_VIEW_NAME = "";
	public static final String EXT_FIELD_TABLE_NAME = "ExtFieldDefinition";
	public static final String EXT_FIELD_VIEW_NAME = "";
	public static final String EXT_FIELD_STRING_VALUE_TABLE_NAME = "ExtFieldStringValue";
	public static final String EXT_FIELD_BOOLEAN_VALUE_TABLE_NAME = "ExtFieldBooleanValue";
	public static final String EXT_FIELD_NUMBER_VALUE_TABLE_NAME = "ExtFieldNumberValue";
	public static final String EXT_FIELD_DATE_VALUE_TABLE_NAME = "ExtFieldDateValue";
	public static final String EXT_FIELD_LONG_VALUE_TABLE_NAME = "ExtFieldLongValue";
	public static final String EXT_FIELD_VALUE_VIEW_NAME = "VW_EXT_ITEM_VALUES";

	// Database field names of the tables involved in the Extension Tables module.
	// These field names will be used in the querys and update statements that take
	// part in the Extension Tables module operations implemented.
	public static final String EXT_TABLE_ID_FIELDNAME = "idExtTable";
	public static final String EXT_TABLE_CODE_FIELDNAME = "codExtTable";
	public static final String EXT_TABLE_DESCRIPTION_FIELDNAME = "tableDescription";
	public static final String EXT_TABLE_IDFIELDNAME_FIELDNAME = "idFieldName";
	
	public static final String EXT_FIELD_ID_FIELDNAME = "idExtField";
	public static final String EXT_FIELD_CODE_FIELDNAME = "codExtField";
	public static final String EXT_FIELD_TYPE_FIELDNAME = "fieldType";
	public static final String EXT_FIELD_LENGTH_FIELDNAME = "fieldLength";
	public static final String EXT_FIELD_DESCRIPTION_FIELDNAME = "fieldDescription";
	public static final String EXT_FIELD_NULLABLE_FIELDNAME = "nullable";
	public static final String EXT_FIELD_HISTORIZABLE_FIELDNAME = "historizable";

	public static final String EXT_FIELD_VALUE_ITEM_ID_FIELDNAME = "idValue";
	public static final String EXT_FIELD_VALUE_VALUE_FIELDNAME = "value";
	public static final String EXT_FIELD_VALUE_STRINGVALUE_FIELDNAME = "strVal";
	public static final String EXT_FIELD_VALUE_NUMBERVALUE_FIELDNAME = "numVal";
	public static final String EXT_FIELD_VALUE_BOOLEANVALUE_FIELDNAME = "booVal";
	public static final String EXT_FIELD_VALUE_DATEVALUE_FIELDNAME = "datVal";
	public static final String EXT_FIELD_VALUE_LONGVALUE_FIELDNAME = "lonVal";
	
	
	// Constants with the codes for the extension fields types defined
	public static final int EXT_FIELD_TYPE_STRING = 1;
	public static final int EXT_FIELD_TYPE_BOOLEAN = 2;
	public static final int EXT_FIELD_TYPE_NUMERIC = 3;
	public static final int EXT_FIELD_TYPE_DATE = 4;
	public static final int EXT_FIELD_TYPE_LONGVALUE = 5;
	
	// Constants with the literal descriptions of the extension fields types defined
	public static String[] EXT_FIELD_TYPES = {
		"STRING", "BOOLEAN", "NUMERIC", "DATE", "LONGVALUE"
	};
}
